package com.dongjiantong.biz.service;

import com.dongjiantong.biz.model.EarMarks;
import com.dongjiantong.mybatis.BaseService;
import com.github.pagehelper.PageInfo;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * Created by ThinkPad on 2017/11/14.
 */
public interface EarMarksReadeService extends BaseService<EarMarks> {
    /**
     * todo 根据养殖场ID 以下条件查询该养殖场所有的耳标list
     *
     * @param farmId     耳标库的养殖场ID
     * @param batch      批次
     * @param pageNum    页码
     * @param pageSize   一页数量
     * @param statusList (集合) 状态 -1、损坏（失效） 1、入库 2、佩标 3、出库
     * @return PageInfo<EarMarks>
     */
    PageInfo<EarMarks> selectByMap(Long farmId, int pageNum, int pageSize, List<Integer> statusList,
                                       String batch,String farmName,List<Long> farmIdList);

    //查询有无重复耳标


    List<EarMarks> selectByRepetitionNumber(List<String> numberMany);

    PageInfo<String> selectBatch(int pageNum, int pageSize,Long farmId);

    PageInfo<String> selectBatch(int pageNum, int pageSize,List<Long> farmIdList,String farmName);

    List<EarMarks> selectByStatusNumber(String number,Long farmId,Integer sum,Integer status);

    PageInfo<EarMarks> selectByLikeNumber(String number,Long farmId, int pageNum, int pageSize);

}
